function [ C] = CalculateCenterFromProjectionMatrix( P)
p1 = P(:,1);
p2 = P(:,2);
p3 = P(:,3);
p4 = P(:,4);

%calclate the camera's center
Cx = det([p2,p3,p4]);
Cy = -det([p1,p3,p4]);
Cz = det([p1,p2,p4]);
Ct = -det([p1,p2,p3]);

C = [Cx Cy Cz]./Ct;


end

